<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Access-Control-Allow-Origin" content="*">
<title>admin</title>
<link href="__PUBLIC__/Admin/images/Admin_css.css" rel="stylesheet" type="text/css" />
<link rel="shortcut icon" href="__PUBLIC__/Admin/images/myfav.ico" type="image/x-icon" />
</head>
<body>
<table width="98%" border="0" align="left" cellpadding="0" cellspacing="0">
  <tr>
    <td height="30"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="15" height="30"><img src="__PUBLIC__/Admin/images/tab_03.gif" width="15" height="30" /></td>
        <td width="24" background="__PUBLIC__/Admin/images/tab_05.gif"><img src="__PUBLIC__/Admin/images/311.gif" width="16" height="16" /></td>
        <td width="1373" background="__PUBLIC__/Admin/images/tab_05.gif" class="title1">系统信息</td>
        <td width="14"><img src="__PUBLIC__/Admin/images/tab_07.gif" width="14" height="30" /></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="9" background="__PUBLIC__/Admin/images/tab_12.gif">&nbsp;</td>
        <td bgcolor="#f3ffe3">
		
		<table border="0" align="center" cellpadding="3" cellspacing="1" class="admintable1" style="margin-top:5px;margin-bottom:5px;">
            <tr>
				<td width="33%" align="left" bgcolor="#FFFFFF" style="height:30px;">产品名称:<font color='green'>{:C('SOFT_NAME')}</font></td>
				<td width="33%" align="left" bgcolor="#FFFFFF" style="height:30px;">产品版本:<font color='green'>{:C('SOFT_VERSION')}<img alt='在线升级' style="cursor:pointer;"  cid="update" src="__PUBLIC__/Admin/images/update.gif" /></font></td>
				<td width="33%" align="left" bgcolor="#FFFFFF" style="height:30px;">开发团队:<font color='green'><a href="http://www.pppon.com" target='_blank'>无界网络</a> <a href='http://www.pppon.com/donate' title='捐赠开发' target='_blank'><img src='__PUBLIC__/Admin/images/donate.gif'/></a></font></td>
            </tr>
			 <tr>
				<td width="33%" align="left" bgcolor="#FFFFFF" style="height:30px;">产品协议:<font color='green' id='shouquan1'>Apache Licence 2.0</font><font color='green' id="shouquan2"></font></td>
				<td width="33%" align="left" bgcolor="#FFFFFF" style="height:30px;">官方网址:<font color='green'><a href="http://www.pppon.com">www.pppon.com</a></font></td>
				<td width="33%" align="left" bgcolor="#FFFFFF" style="height:30px;">产品社区:<font color='green'><a href="http://www.pppon.com/blog" target="_blank">www.pppon.com/blog</a></font></td>
            </tr>
          </table>
		  
		  
          <table border="0" align="center" cellpadding="3" cellspacing="1" class="admintable1">
            <tr>
              <td width="33%" align="left" bgcolor="#FFFFFF" style="height:30px;">模型：
				<volist id="vo" name="arcmodellist">
				<a href="{:U('Archive/add?modelid=')}{$vo.id}">{$vo.typename}</a>&nbsp;
				</volist>
			  </td>
              <td width="33%" align="left" bgcolor="#FFFFFF">栏目总数：<font color="red">{$num.typenum}</font> </td>
              <td align="left" bgcolor="#FFFFFF"><span style="float:right" id='adda'><img style="cursor:pointer;" alt='展开' onclick='hiddena(0)'  src='__PUBLIC__/Admin/images/add.gif'/></span>文档总数：<font color="red">{$num.totalnum}</font></td>
            </tr>
			
			<tr class='hiddena' style='display:none;'>
              <td width="33%" align="left" bgcolor="#FFFFFF" style="height:30px;">已审核：<font color="red">{$num.postednum}</font></td>
              <td width="33%" align="left" bgcolor="#FFFFFF">未审核：<font color="red">{$num.unpostednum}</font> </td>
              <td align="left" bgcolor="#FFFFFF">回收站：<font color="red">{$num.recyclenum}</font></td>
            </tr>
			
			
            <tr class='hiddena' style='display:none;'>
              <td width="33%" align="left" bgcolor="#FFFFFF" style="height:30px;">今日新增：<font color="red">{$num.todaynum}</font>  </td>
              <td width="33%" align="left" bgcolor="#FFFFFF">最近一周：<font color="red">{$num.weeknum}</font> </td>
              <td align="left" bgcolor="#FFFFFF"><span style="float:right" id='unadda'><img style="cursor:pointer;" alt='收起' onclick='hiddena(1)'  src='__PUBLIC__/Admin/images/unadd.gif'/></span>最近一月：<font color="red">{$num.monthnum}</font></td>
            </tr>
          </table>
		  
		  <table border="0" align="center" cellpadding="3" cellspacing="1" class="admintable1" style="margin-top:5px;">
            <tr>
			<volist name="info" id="v" mod="3">
              <td width="33%" align="left" bgcolor="#FFFFFF" style="height:30px;"><eq name='i' value='3'><span style="float:right" id='addb'><img style="cursor:pointer;" alt='展开' onclick='hiddenb(0)' src='__PUBLIC__/Admin/images/add.gif'/></span></eq><eq name='i' value='12'><span style="float:right" id='unaddb'><img style="cursor:pointer;" alt='收起' onclick='hiddenb(1)' src='__PUBLIC__/Admin/images/unadd.gif'/></span></eq>{$key}：<font color="red">{$v}</font></td>
			  <eq name= "mod" value="2"></tr><tr class="hiddenb" style='display:none;'></eq> 
			 </volist>
            </tr>
          </table>
		  
		  
          
          <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td width="50%"><table border="0" cellspacing="2" cellpadding="3"  align="left" class="admintable1" style="margin-top:5px;width:99%;">
                <tr>
                  <td align="left" class="admintitle">系统缓存清理</td>
                </tr>
                <tr>
                  <td height="80" bgcolor="#FFFFFF" style="text-align:left;height:75px;line-height:22px;">注意：此操作用于清空<font color="red"><b>Web,Admin,User</b></font>下runtime文件夹,更新系统配置或修改系统模板后请及时更新缓存
                    <form id="form1" name="form1" method="post" action="{:U('Clear/index')}">
                        <input type="submit" name="button" id="button" value="开始清理"  style="background:#ffffff;"/>
                    </form></td>
                </tr>
              </table></td>
              <td><table border="0" cellspacing="2" cellpadding="3" align="right" class="admintable1" style="margin-top:5px;width:99%">
                <tr>
                  <td align="left" class="admintitle">快捷管理</td>
                </tr>
                <tr>
                  <td height="80" bgcolor="#FFFFFF" style="text-align:left;height:75px;line-height:22px;text-align:center;">
				 <input type="button" name="button" value="检测更新" class="bnt" cid="update"/>&nbsp;&nbsp;
				  <input type="button" name="button" value="广告管理" class="bnt" onClick="window.location.href='{:U('Ad/index')}'" />&nbsp;&nbsp;
					<input type="button" name="button" value="主题管理" class="bnt" onClick="window.location.href='{:U('Tpl/index')}'" />&nbsp;&nbsp;
                   <input type="button" name="button" value="插件管理" class="bnt" onClick="window.location.href='{:U('PluginManage/index')}'" />&nbsp;&nbsp;</td>
                </tr>
              </table></td>
            </tr>
          </table></td>
        <td width="9" background="__PUBLIC__/Admin/images/tab_16.gif">&nbsp;</td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="29"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="15" height="29"><img src="__PUBLIC__/Admin/images/tab_20.gif" width="15" height="29" /></td>
        <td background="__PUBLIC__/Admin/images/tab_21.gif">&nbsp;</td>
        <td width="14"><img src="__PUBLIC__/Admin/images/tab_22.gif" width="14" height="29" /></td>
      </tr>
    </table></td>
  </tr>
</table>
</body>
</html>
<import file= "Admin.js.admin,Admin.js.Ajax,Admin.js.Jquery"/> 
<script charset="utf-8" src="__PUBLIC__/Common/artDialog/jquery.artDialog.js?skin=green"></script>
<script charset="utf-8" src="__PUBLIC__/Common/artDialog/extend.js"></script>
<script>
$(document).ready(function(){
	var safeauth = '{$safeauth}';
	if(safeauth!='1')
	{
		artDialog.firstauthset('安全密码设置','初次使用,请先设置您的安全密码','');
	}
});
artDialog.firstauthset = function (title,content,url) {
    var input;
    var value;
    var pwdvalue;
    return artDialog({
        id: 'locking',
        icon: 'warning',
		drag: false,
		resize: false,
		title:title,
        fixed: true,
        lock: true,
        opacity: 0,
        content: [
            '<div style="margin-bottom:5px;font-size:12px">',
                content,
            '</div>',
            '<div>',
			 '<div>',
                '<input value="',
                    value,
                '" id="lockingverifyx" style="width:18em;padding:6px 4px" />',
            '</div>',
			 '<div style="margin-top:5px;font-size:12px;display:none">',
                '<a href="'+ url +'" target="_blank">忘记了安全密码?</a>',
            '</div>'
            ].join(''),
        init: function () {
            input = this.DOM.content.find('input')[0];
            input.select();
            input.focus();
			this.shake && this.shake();// 调用抖动接口
        },
        ok: function (here) {
		var xval = $('#lockingverifyx').val();
		if(xval=='')
		{
			this.shake && this.shake();// 调用抖动接口
			input = this.DOM.content.find('input')[0];
			input.select();
			input.focus();
			return false;
		}
		else
		{
			$.ajax({
			type: "POST",
			url: '{:U('Public/dosafeauthset')}',
			data: "auth="+xval,
			success: function(msg){
					//alert(msg);
					if(msg==0)
					{
						artDialog.firstauthset('安全密码设置','初次使用,请先设置您的安全密码','http://doc.waikucms.com');
					}
					if(msg==2)
					{
						parent.parent.window.location.href='{:U('Public/loginout')}';
					}
					if(msg==1)
					{
						art.dialog.tips('设置成功!');
					}
					}
			});
		}
        
        },
        cancel: false
    });
};
$(function($) {
	var notice = '{:cookie("updatenotice")}';
	 $.post("{:U('Update/index')}", { version: "{:substr(C('SOFT_VERSION'),-8)}"},
	function(data){	
	if(data.msg==1 && notice !=1)
	{
		jconfirm('系统检测到有新版本!是否更新?<br/>当前版本:{:C('SOFT_VERSION')}&nbsp;&nbsp;最新版本:'+data.version,'{:U('Update/update')}');
	}
   });
}); 
   $("[cid='update']").click( function () {
   art.dialog.tips('正在检测新版本...',60);
	//$('#update').fadeOut("slow");
	 $.post("{:U('Update/index')}", { version: "{:substr(C('SOFT_VERSION'),-8)}"},
	function(data){
    if(data.msg==0)
	{
		art.dialog.tips('已经是最新版本!');
	}	
	if(data.msg==1)
	{
		jconfirm('系统检测到有新版本!是否更新?<br/>当前版本:{:C('SOFT_VERSION')}&nbsp;&nbsp;最新版本:'+data.version,'{:U('Update/update')}');
	}
	if(data.msg==2)
	{
		art.dialog.tips('检测更新失败!');
	}
   });
   
   
   });
artDialog.updatesystem = function (str,url) {
    
    return artDialog({
		title:'歪酷CMS系统在线更新',
        id: 'updatesystem',
        fixed: true,
        lock: true,
        opacity: .1,
        content: [
            '<div style="margin-bottom:10px;font-size:12px" id="art_content">',
                str,
            '</div>',
            '<div>',
                '备份整站: <input type="checkbox"  name="art_backupall" id="art_backupall"/>&nbsp;&nbsp;备份数据库: <input type="checkbox"  name="art_backupsql" id="art_backupsql"/><br/>',
				'<div style="margin-bottom:5px;margin-top:5px;font-size:12px">系统更新也会有意外,推荐备份数据!整站备份不包括Public目录,Public目录请自行备份!</div>',
            '</div>',
            ].join(''),
        init: function () {
		$.post("{:U('Update/applycookie')}");
        },
        ok: function (here) {
			if($('#art_backupall').attr('checked')=='checked') url = url + '&backupall=1';
			if($('#art_backupsql').attr('checked')=='checked') url = url + '&backupsql=1';
			window.location.href=url;
			art.dialog.tips('请勿关闭浏览器,系统正在更新中...',60);
        },
        cancel: function(here)
		{
			var list = art.dialog.list;
			for (var i in list) {
			list[i].close();
			};
			return true;
		}
    });
};
function jconfirm(str,url)
{
   artDialog.updatesystem(str,url);
}

function hiddena(i)
{
	if(i==0)
	{
		$('.hiddena').fadeIn("slow");
		$('#adda').fadeOut("slow");
		$('#unadda').fadeIn("slow");
	}
	if(i==1)
	{
		$('#unadda').fadeIn("slow");
		$('.hiddena').fadeOut("slow");
		$('#adda').fadeIn("slow");
	}
}
function hiddenb(i)
{
	if(i==0)
	{
		$('.hiddenb').fadeIn("slow");
		$('#addb').fadeOut("slow");
		$('#unaddb').fadeIn("slow");
	}
	if(i==1)
	{
		$('#unaddb').fadeIn("slow");
		$('.hiddenb').fadeOut("slow");
		$('#addb').fadeIn("slow");
	}
}
</script>
